home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / swtools / mipsABI / examples / sup / PORT / step07 / expand.c.diff next >
Encoding:
Text File  |  1994-08-02  |  1.1 KB  |  62 lines

  1. *** ../dist/expand.c    Thu Dec 16 07:29:28 1993
  2. --- expand.c    Fri Dec 17 16:41:07 1993
  3. ***************
  4. *** 61,72 ****
  5. --- 61,87 ----
  6.    */
  7.   #include <sys/param.h>
  8.   #include <sys/stat.h>
  9. + #ifdef _ABI_SOURCE
  10. + #include <dirent.h>
  11. + #else
  12.   #include <sys/dir.h>
  13. + #endif
  14.   #include <pwd.h>
  15.   #include <ctype.h>
  16.   #include <libc.h>
  17.   #include <setjmp.h>
  18.   
  19. + #if __STDC__
  20. + static glob(char *);
  21. + static matchdir(char *);
  22. + static execbrc(char *, char *);
  23. + static match(char *, char *);
  24. + static amatch(char *, char *);
  25. + static addone(char *, char *);
  26. + static addpath(char);
  27. + static gethdir(char *);
  28. + #endif
  29.   static    jmp_buf    sjbuf;
  30.   
  31.   static    char    pathbuf[MAXPATHLEN];
  32. ***************
  33. *** 148,154 ****
  34. --- 163,173 ----
  35.   static matchdir(pattern)
  36.       char *pattern;
  37.   {
  38. + #ifdef _ABI_SOURCE
  39. +     register struct dirent *dp;
  40. + #else
  41.       register struct direct *dp;
  42. + #endif
  43.       DIR *dirp;
  44.   
  45.       dirp = opendir(path);
  46. ***************
  47. *** 332,339 ****
  48. --- 351,362 ----
  49.       while (*ep++ = *s2++);
  50.   }
  51.   
  52. + #ifdef __STDC__
  53. + static addpath(char c)
  54. + #else
  55.   static addpath(c)
  56.       char c;
  57. + #endif
  58.   {
  59.       if (pathp >= lastpathp)
  60.           return(1);
  61.